//package org.jeecg.modules.third.controller;
//
//import com.alibaba.fastjson.JSONObject;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.models.auth.In;
//import org.jeecg.common.api.vo.Result;
//import org.jeecg.common.aspect.annotation.AutoLog;
//import org.jeecg.modules.third.entity.ThirdInfo;
//import org.jeecg.modules.third.service.IThirdInfoService;
//import org.jeecg.util.WeiBoUtil;
//import org.jeewx.api.core.common.util.WeixinUtil;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.HashMap;
//import java.util.Map;
//
//@RestController
//@RequestMapping("/third/thirdData")
//public class ThirdDataController {
//
//    @Autowired
//    private  WeiBoUtil weiBoUtil;
//    @Autowired
//    private IThirdInfoService thirdInfoService;
//
//    @ApiOperation(value="bas_third_info-添加", notes="bas_third_info-添加")
//    @PostMapping(value = "/getData")
//
//    public Result<?> add(Integer type,String id) {
//        //发文数量 转发数  收藏数 阅读数读用户数据
//        Integer fansCount = 0;
//        Integer articleCount = 0;
//        Map<String,Object> resultMap =new HashMap<>();
//
//        ThirdInfo thirdInfo = thirdInfoService.getById(id);
//        if(type ==4){
//           //微博
//            JSONObject userInfo = weiBoUtil.getUserInfo(thirdInfo.getId(), thirdInfo.getClientKey(), thirdInfo.getClientSecret(), thirdInfo.getAuthorizationCode());
//             fansCount = userInfo.getInteger("followers_count");
//             articleCount = userInfo.getInteger("statuses_count");
//            resultMap.put("fansCount",fansCount);
//            resultMap.put("articleCount",articleCount);
//           // thirdInfo
//
//        }else if(type ==1){
//            //微信  用户数读接口，
//            //WeixinUtil.
//        }
//        return  null;
//    }
//
//
//
//    @ApiOperation(value="bas_third_info-添加", notes="bas_third_info-添加")
//    @PostMapping(value = "/author")
//    public Result<?> author(Integer type) {
//        Integer fansCount = 0;
//        Integer articleCount = 0;
//        Map<String, Object> resultMap = new HashMap<>();
//
//
//        return null;
//    }
//
//}
